from redis import StrictRedis


class Config:
    DEBUG = None
    SECRET_KEY = '4HCksdF2jIMJNuiXau4b+TXapkC1xSeNvLMw3j7zXZ/EeInVngj4Dr/+6ykaDtWoWHztrbxflZ29EGdA'
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/info2'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(host='127.0.0.1',port=6379)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400


class Development(Config):

    DEBUG = True


class Production(Config):

    DEBUG = False

config_dict = {
    'development':Development,
    'production':Production
}